import { ICharacterState } from "../../interface/ICharacterState";
import { Character } from "../Character";


export abstract class CharacterStateBase implements ICharacterState {

    public character: Character;
    public timer: number;
    public animationLength: number;

    public canEnterVehicles: boolean;
    public canFindVehiclesToEnter: boolean;
    public canLeaveVehicles: boolean;

    constructor ( character: Character ) {

        this.character = character;

        // this.character.velocitySimulator.damping = this.character.defaultVelocitySimulatorDamping;
        // this.character.velocitySimulator.mass = this.character.defaultVelocitySimulatorMass;

        // this.character.rotationSimulator.damping = this.character.defaultRotationSimulatorDamping;
        // this.character.rotationSimulator.mass = this.character.defaultRotationSimulatorMass;

        this.character.arcadeVelocityIsAdditive = false;
        this.character;

        this.canFindVehiclesToEnter = true;
        this.canEnterVehicles = false;
        this.canLeaveVehicles = true;

        this.timer = 0;

    }

    public update ( timeStep: number ): void {
        this.timer += timeStep;
    }

    public onInputChange (): void {

    }
}